The present invention relates to computers, and more particularly to a method for automatically adjusting a host protected area using the basic input/output system (BIOS).
The most recently available hard disk drives that support ATA spec 4 or above support a host protected area. This is an area of a hard disk drive""s storage capacity that is not normally accessible to a user. The host protected area starts at the maximum address+1 and ends at an address returned by a READ NATIVE MAX ADDRESS command. The start address of the host protected area can be set using a SET MAX ADDRESS command. This is illustrated in FIG. 1, which shows the structure of a hard disk drive having a host protected area.
The Native Max Address sector of the hard disk drive contains the Boot Engineering Extension Record (BEER) and one or more optional Directory of Service Entries. There can be more Service Entries in sectors before the Native Max Address sector. The basic input/output system (BIOS) uses BEER and Service entries to obtain information regarding the host protected area.
FIG. 2 is a chart that shows the Boot Engineering Extension Record (BEER). FIG. 3 is a chart that shows exemplary Directory of Service Entries. FIG. 4 shows an exemplary BEER and Service Entries.
Many computer systems manufacturers wish to have a single source image for the data placed in the host protected area of the hard disk drive. The manufacturers copy that image to the host protected area of hard disk drives having different sizes and manufacturers.
However, even though the data for the host protected area is copied to the end of target hard disk drive by a copy machine or by network copy software and all the data is in the appropriate location for the target hard disk drive, Offset 6471 (Host Protected Area Start) of the BEER and offset 2-9 (Service Area Start) of the Services Entry contain the physical sector addresses which may not be correct for target hard disk drive. Because there are lots of hard disk copy machines and network installation software, it cannot be guarantees if the host protected area is copied properly and physical sector address fields are correct.
It is an objective of the present invention to provide for a method that automatically adjusts a host protected area using the basic input/output system (BIOS).
The present invention adjusts the host protected area of a hard disk drive automatically using BIOS during power on self test (POST). In particular, the present invention adjusts the start address of the host protected area of the hard disk drive and adjusts all service entries in the directory of services of the hard disk drive automatically using the BIOS during power on self test. Thus, host protected area physical disk addresses are adjusted automatically by the BIOS during POST when the hard disk drive has a different location from the host protected area used to create the source image of the data placed in the host protected area of the hard disk drive.
To accomplish this, the present invention, and in particular the BIOS software, performs the following steps.
The BIOS software reads the Boot Engineering Extension Record (BEER) and Directory of Service from hard disk drive. The BIOS software then verifies if bit 0 of BEER offset 4-5 (Capabilities word) is set. This bit means that Reported Sector/Device field of the BEER has valid data that is the number of total sectors in the master hard disk drive.
The BIOS software then checks if the master hard disk drive and a target hard disk drive have the same size. This is achieved by comparing the Reported Sector/Device and the Native Max Address+1 of the target hard disk drive.
The size difference is then determined. The size difference=Reported Sector/Devicexe2x88x92(Native Max Address+1) if the target hard disk drive has smaller size, or (Native Max Address+1)xe2x88x92Reported Sector/Device if the target hard disk drive has larger size.
The BIOS software adds the size difference to the host protected area Start field in the BEER (offset 64-71). The BIOS software gets the number of Service Entries from BEER offset 80-81. The BIOS software adds the size difference to the Service Area Start field (offset 2-9) of all Service Entries.
The BIOS software then updates the Reported Sectors/Device field of the BEER to the target hard disk drive size (Native Max Address+1). The BIOS software calculates the checksum for the BEER and Service Entries and saves it to the checksum field. The BIOS software then writes the updated BEER and Service Entries to the hard disk drive.
The advantage of the present invention is that computer companies will not need to depend on copy machines or network copy software to adjust sector addresses defining the Host Protected Area when the target hard disk drive has physical sector locations that are different from the source image. Once copy machine or network copy software copies the Host Protected Area to the end of the hard disk drive, and then the BIOS will adjust the Host Protected Area automatically during POST when the computer system is turned on.